<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>文件管理系统-杨磊</title>
    <!--     导入 css 文件 -->
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.18.0/bootstrap-table.min.css" rel="stylesheet">
    <link href="https://cdn.bootcdn.net/ajax/libs/bootstrap-datetimepicker/1.0.0/css/bootstrap-datetimepicker.min.css"
          rel="stylesheet">
    <link href="https://cdn.bootcdn.net/ajax/libs/x-editable/1.5.0/bootstrap3-editable/css/bootstrap-editable.css"
          rel="stylesheet">
    <!--     导入 js 文件  -->
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery.serializeJSON/1.0.2/jquery.serializeJSON.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.0.0/js/bootstrap.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.18.0/bootstrap-table.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.18.0/locale/bootstrap-table-zh-CN.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/smalot-bootstrap-datetimepicker/1.0.0/js/bootstrap-datetimepicker.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.18.0/extensions/editable/bootstrap-table-editable.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/x-editable/1.5.0/bootstrap3-editable/js/bootstrap-editable.min.js"></script>
    <!--  导入 index.js  -->
    <script src="js/index.js"></script>
</head>
<body>
<!--所有的 bootstrap 组件必须写在一个 class=container 的 div 中-->
<div class="container">
    <!--  按钮组 -->
    <div class="btn-group" role="group" id="toolbar">
        <button type="button" class="btn btn-default"
                data-toggle="modal" data-target="#login_modal">登陆
        </button>
        <button type="button" class="btn btn-default"
                data-toggle="modal" data-target="#create_modal">创建文件夹
        </button>
        <button type="button" class="btn btn-default"
                data-toggle="modal" data-target="#upload_modal">文件上传
        </button>
        <button type="button" class="btn btn-default" onclick="deleteChoose();">删除选中</button>
        <button type="button" class="btn btn-default"
                onclick="directoryBack()">后退一步
        </button>
        <button type="button" class="btn btn-default"
                onclick="logout()">登出
        </button>

        <span id="uname_span" style="float:right;margin-left:700px;"></span>
    </div>

    <!--  定义页头  -->
    <div class="page-header">
        <h1>智游网盘 <small id="small_name">云盘系统</small></h1>
    </div>
    <!-- 定义表格   -->
    <div class="table" id="tab">

    </div>
</div>


<!--登陆模态框-->
<div class="modal fade" id="login_modal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="exampleModalLabel">用户登陆</h4>
            </div>
            <div class="modal-body">
                <form id="login_form">
                    <div class="form-group">
                        <label class="control-label">用户名称:</label>
                        <label>
                            <input type="text" class="form-control" name="uname" value="韩梅梅">
                        </label>
                    </div>
                    <div class="form-group">
                        <label class="control-label">用户密码:</label>
                        <label>
                            <input type="password" class="form-control" name="upwd" value="123">
                        </label>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">重填</button>
                <button type="button" class="btn btn-primary" onclick="login();">登陆</button>
            </div>
        </div>
    </div>
</div>

<!--创建文件夹模态框-->
<div class="modal fade" id="create_modal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-body">
                <form id="create_form">
                    <div class="form-group">
                        <label class="control-label">文件夹名字:</label>
                        <label>
                            <input type="text" class="form-control" name="dname">
                        </label>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">重填</button>
                <button type="button" class="btn btn-primary" onclick="createMyDirectory();">创建</button>
            </div>
        </div>
    </div>
</div>

<!--文件上传的模态框-->
<div class="modal fade" id="upload_modal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">文件上传</h4>
            </div>
            <div class="modal-body">
                <form id="upload_form">
                    <div class="form-group">
                        <label class="control-label">文件名字:</label>
                        <label>
                            <input type="text" class="form-control" name="dname">
                        </label>
                    </div>
                    <div class="form-group">
                        <label class="control-label">选择文件:</label>
                        <input type="file" class="form-control" name="file">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">重填</button>
                <button type="button" class="btn btn-primary" onclick="uploadMyFile();">上传</button>
            </div>
        </div>
    </div>
</div>

</body>
</html>